Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JC: Support vanilla multi-object delete #73

Closed
wants to merge 1 commit into from
Closed

JC: Support vanilla multi-object delete #73

wants to merge 1 commit into from

Conversation

johnchapin
Copy link

This PR adds basic support for multi-object delete.

user=> (require '[aws.sdk.s3 :as s3])
nil
user=> (s3/delete-objects aws-credentials "my-bucket" ["foo" "bar" "baz"])
{:objects ({:delete-marker-version-id nil, :delete-marker? false, :key "bar", :version-id nil} {:delete-marker-version-id nil, :delete-marker? false, :key "foo", :version-id nil} {:delete-marker-version-id nil, :delete-marker? false, :key "baz", :version-id nil})}
user=> (s3/delete-objects aws-credentials "my-bucket" ["foo" "bar" "baz"] {:quiet true})
{:objects ()}

I didn't attempt to handle it here, but if there are opinions or precedent on dealing with request limits (for example, the 1000 object limit for multi-object delete), I'm happy to address them. At the moment, my application code is handling the partitioning of keys to respect the object limit, but that logic might have a place in this library instead.

Another potential TODO item is handling multi-object delete for versioned objects.

@johnchapin
Copy link
Author

Whoops - I see this largely duplicates the effort of #70, which dates from December.

@johnchapin johnchapin closed this Jan 20, 2022
@johnchapin johnchapin deleted the multi_object_delete branch January 20, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant